package com.taikang.hmp.hbusiness.diabetes.measure.version.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.taikang.hmp.frame.common.datastructre.Dto;
import com.taikang.hmp.frame.common.datastructre.support.BaseDto;
import com.taikang.hmp.frame.common.service.impl.BaseServiceImpl;
import com.taikang.hmp.hbusiness.diabetes.measure.version.service.IVersionService;
import com.taikang.hmp.hbusiness.doctor.setbase.bean.Version;


/** 
 * 版本
 * author:qrp
 * time:2016年2月19日 上午10:58:10
 */
public class VersionServiceImpl extends BaseServiceImpl implements IVersionService{

	public List<Dto> getVersion(Dto paramDto) {
		Map<String,String> map = new HashMap<String,String>();
		map.put("os", paramDto.getAsString("os"));
		String market = paramDto.getAsString("market");
		if(!market.equals("") && market != null ){
			map.put("market", paramDto.getAsString("market"));
		}else{
			map.put("market", "yingyongbao");
		}
		Dto ver = (Dto)super.getNewDao().queryForObject("dia_version_space.getVersion", map);
		List<Dto> result = new ArrayList<Dto>();
		Dto resultMap = new BaseDto();
		resultMap.put("ver",ver.getAsString("ver"));
		resultMap.put("link",ver.getAsString("link"));
		resultMap.put("ver_desc",ver.getAsString("ver_desc"));
		result.add(resultMap);
		return result;
	}

}
